package com.myschool.service;

import com.myschool.dao.SubjectDao;
import com.myschool.entity.Subject;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubjectService {

    @Autowired
    SubjectDao subjectDao;

    public List<Subject> getAll(){
        return subjectDao.getAll();
    }

    public Subject getOne(Integer subjectNo){
        return subjectDao.getOne(subjectNo);
    }

    public void add(Subject subject){
        subjectDao.add(subject);
    }

    public void update(Subject subject){
        subjectDao.update(subject);
    }

    public void delete(Integer subjectNo){
        subjectDao.delete(subjectNo);
    }
}
